<div class="pageContent">
	
	<form method="post" action="/index.php?act=custormvisit&st=custormvisitEdit" class="pageForm required-validate" onsubmit="return validateCallback(this, dialogAjaxDone)">
	<input type="hidden" name="id" value="{$cvisit.customer_visited_id}" />
		<div class="pageFormContent" layoutH="58">

			<p>
				<label>走访客户：</label>
				<input name="visit_custorm" class="required" type="text" size="30" value="{$cvisit.visit_custorm}" errormsg="请输入走访客户"/>
			</p>
			<p>
				<label>合作状态：</label>
				<select name="cooperation_status" class="required combox" errormsg="请选择合作状态">
					<option value="">请选择合作状态</option>
					<option value="0" {if $cvisit.cooperation_status eq 0}selected{/if}>无合作历史</option>
					<option value="1" {if $cvisit.cooperation_status eq 1}selected{/if}>合作中</option>
					<option value="2" {if $cvisit.cooperation_status eq 2}selected{/if}>合作中断</option>
				</select>
			</p>
			<p>
				<label>客户归属单位：</label>
				<select name="custorm_unit" class="combox" errormsg="请选择归属单位">
					<option value="">请选择归属单位</option>
					{foreach item=item from=$unit_category}
					<option value="{$item.unit_category_id}" {if $item.unit_category_id eq $cvisit.custorm_unit}selected{/if}>{$item.category_name}</option>
					{/foreach}
				</select>
			</p>
			<p>
				<label>客户维护人：</label>
				<input name="custorm_maintain" type="text" size="30" value="{$cvisit.custorm_maintain}" errormsg="请输入客户维护人"/>
			</p>
			<p>
				<label>客户地址：</label>
				<input name="custorm_addr" type="text" size="30" value="{$cvisit.custorm_addr}" errormsg="请输入客户地址"/>
			</p>
			<div class="divider"></div>

			<p>
				<label>接待人姓名：</label>
				<input name="recive_name" type="text" size="30" value="{$cvisit.recive_name}" errormsg="请输入接待人姓名"/>
			</p>
			<p>
				<label>接待人职务：</label>
				<input name="recive_study" type="text" size="30" value="{$cvisit.recive_study}" errormsg="请输入接待人职务" />
			</p>
			<p>
				<label>接待人电话：</label>
				<input name="recive_tel" type="text" size="30" value="{$cvisit.recive_tel}" errormsg="请输入接待人电话"/>
			</p>
			<p>
				<label>接待人邮箱：</label>
				<input name="recive_email" type="text" size="30" value="{$cvisit.recive_email}" errormsg="请输入接待人邮箱"/>
			</p>
			<div class="unit">
				<label>用户概况：</label>
				<textarea name="user_recent" rows="10" cols="100">{$cvisit.user_recent}</textarea>
			</div>
			<div class="unit">
				<label>合作期望：</label>
				<textarea name="cooperation" rows="10" cols="100">{$cvisit.cooperation}</textarea>
			</div>
			<div class="divider"></div>
			<div class="unit">
				<label>现场照片：</label>
				{$cvisit.image_name}&nbsp;&nbsp;&nbsp;&nbsp;{if !empty($cvisit.image)}<a class="add" href="/index.php?act=custormvisit&st=view_image&id={$cvisit.customer_visited_id}" target="dialog" rel="view_image" title="现场图片查看" mask="true" width="910" height="400" max="true">照片查看</a>{/if}
			</div>
			<div class="unit">
				<dl>
					<label>微信端可见用户：</label>
					<dd>
						<table border="1" width="600px" style="padding:0 0 0 0;margin:0 0 0 0;">		
							<tbody>
								{foreach item=items from=$category}
								<tr width="100%" style="padding:0 0 0 0;margin:0 0 0 0;">						
									<td>
										<label>
											<input type="checkbox" group="category_{$items.user_category_id}[]" class="checkboxCtrl" {if in_array($items.user_category_id,$cvisit.visibleparents)}checked{/if}/>{$items.category_name}
											<input type="hidden" name="parent_id[]" value="{$items.user_category_id}">
										</label>
									</td>
									<td>
									{foreach item=child from=$items.child}
										<label>
											<input type="checkbox" name="category_{$items.user_category_id}[]" value="{$child.user_category_id}" {if ($cvisit.visible and in_array($child.user_category_id,$cvisit.visible))}checked{/if} />{$child.category_name}
										</label>
									{/foreach}
									</td>
								</tr>
								{/foreach}
							</tbody>
						</table>
					</dd>
				</dl>
				<br/><br/><br/><br/><br/><br/><br/><br/><br/>
			</div>

			<p>
				<label>走访业务员微信ID号：</label>
				<input name="openids" type="text" size="30" value="{$cvisit.openids}" errormsg="请输入走访业务员微信ID号" alt="业务员微信ID,最多5个,以#分割"/>
			</p>
			<p>
				<label>走访业务员：</label>
				<input name="visiter_name" type="text" size="30" value="{$cvisit.visiter_name}" errormsg="请输入走访业务员"/>
			</p>
			<p>
				<label>走访日期：</label>
				<input type="text" name="visiter_date" class="date" size="30" value="{$cvisit.visiter_date}" errormsg="请输入走访日期" dateFmt="yyyy-MM-dd HH:mm:ss" readonly="true"/><a class="inputDateButton" href="javascript:;">选择</a>
			</p>
			<p>
				<label>业务员归属单位：</label>
				<select name="business_unit" class="combox" errormsg="请选择归属单位">
					<option value="">请选择归属单位</option>
					{foreach item=item from=$unit_category}
					<option value="{$item.unit_category_id}" {if $item.unit_category_id eq $cvisit.business_unit}selected{/if}>{$item.category_name}</option>
					{/foreach}
				</select>
			</p>
			<div class="unit">
				<label>审核状态：</label>
				<input type="radio" name="status" value="0" {if $cvisit.status eq 0}checked{/if}/>待审核
				<input type="radio" name="status" value="1" {if $cvisit.status eq 1}checked{/if}/>已审核
			</div>
			<p>
				<label>审核结论：</label>
				<input name="handle_msg" type="text" size="30" value="{$cvisit.handle_msg}" errormsg="请输入handle_msg"/>
			</p>
			<p>
				<label>处理日期：</label>
				<input type="text" name="handle_date" class="date" size="30" value="{$cvisit.handle_date}" errormsg="请输入处理日期" dateFmt="yyyy-MM-dd HH:mm:ss" readonly="true"/><a class="inputDateButton" href="javascript:;">选择</a>
			</p>
		</div>
		

		<div class="formBar">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit">提交</button></div></div></li>
				<li><div class="button"><div class="buttonContent"><button type="button" class="close">取消</button></div></div></li>
			</ul>
		</div>

	</form>

</div>